import { LGXBItemData } from "../view/LGXB/data/LGXBItemData";
import { LGXBData } from "../view/LGXB/data/LGXBData";
import { Vector } from "../../../__AS3__/vec/Vector";
//class LGXBConfig
    
    export  class LGXBConfig
    {
        constructor()
        {
            
            this.map = new Vector.<LGXBItemData>();
            if (LGXBConfig._instance != null) 
            {
                throw new Error(" BossConfig 单例 ");
            }
            this.init();
            return;
        }

        /* internal  */write(arg1: Object): void
        {
            var loc1=null;
            var loc2=0;
            var loc3=arg1;
            for(loc1 of loc3) 
            {
                this.map.push(new LGXBItemData(loc1));
            }
            return;
        }

        public init(): void
        {
            var loc1=LGXBData.instance.getJsonObject();
            this.write(loc1);
            return;
        }

        public static get instance(): LGXBConfig
        {
            if (LGXBConfig._instance == null) 
            {
                LGXBConfig._instance = new LGXBConfig();
            }
            return LGXBConfig._instance;
        }

        public /* var */map: Vector.<LGXBItemData>;

        /* internal */ static /* var */_instance: LGXBConfig;
    }
